package practicedemo23;

public class phoneTest {
    public static void main(String[] args) {
        //创建手机的对象
        phone iphone = new phone();
        phone Redmi = new phone();

        //给对象赋值
        iphone.brand = "苹果";
        iphone.price = 5000.0;

        Redmi.brand = "红米";
        Redmi.price = 4000.0;

        //获取手机的值(iphone)
        System.out.println(iphone.brand);
        System.out.println(iphone.price);
        //调用手机方法（行为）(iphone)
        iphone.playGame();
        iphone.call();

        //获取手机的值(Redmi)
        System.out.println(Redmi.brand);
        System.out.println(Redmi.price);
        //调用手机的方法（行为）(Redmi)
        Redmi.call();
        Redmi.playGame();
    }
}
